import {
	UserLayout,
	TabLayout,
	RouteView,
	BlankLayout,
	PageView
} from '@/components/layouts'

/**
 * 走菜单，走权限控制
 * @type {[null,null]}
 */
export const asyncRouterMap = [

	{
		path: '/',
		name: 'dashboard',
		component: TabLayout,
		meta: {
			title: '首页'
		},
		redirect: '/dashboard/analysis',
		children: [	
			// dashboard
			{
			  path: '/dashboard',
			  name: 'dashboard',
			  redirect: '/dashboard/workplace',
			  component: RouteView,
			  meta: { title: '仪表盘', icon: 'dashboard', permission: [ 'dashboard' ] },
			  children: [
			    {
			      path: '/dashboard/analysis',
			      name: 'Analysis',
			      component: () => import('@/views/dashboard/Analysis'),
			      meta: { title: '分析页', permission: [ 'dashboard' ] }
			    },
			    {
			      path: '/dashboard/monitor',
			      name: 'Monitor',
			      hidden: true,
			      component: () => import('@/views/dashboard/Monitor'),
			      meta: { title: '监控页', permission: [ 'dashboard' ] }
			    },
			    {
			      path: '/dashboard/workplace',
			      name: 'Workplace',
			      component: () => import('@/views/dashboard/Workplace'),
			      meta: { title: '工作台', permission: [ 'dashboard' ] }
			    }
			  ]
			},
		]
	},
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
	{
		path: '/user',
		component: UserLayout,
		redirect: '/user/login',
		hidden: true,
		children: [{
				path: 'login',
				name: 'login',
				component: () => import( /* webpackChunkName: "user" */ '@/views/user/Login')
			},
			{
				path: 'register',
				name: 'register',
				component: () => import( /* webpackChunkName: "user" */ '@/views/user/register/Register')
			},
			{
				path: 'register-result',
				name: 'registerResult',
				component: () => import( /* webpackChunkName: "user" */ '@/views/user/register/RegisterResult')
			},
			{
				path: 'alteration',
				name: 'alteration',
				component: () => import( /* webpackChunkName: "user" */ '@/views/user/alteration/Alteration')
			},
		]
	},
	// {
	//   path: '/',
	//   name: 'index',
	//   component: TabLayout,
	//   meta: {title: '首页'},
	//   redirect: '/dashboard/workplace',
	//   children: [
	//     {
	//       path: '/online',
	//       name: 'online',
	//       redirect: '/online',
	//       component: RouteView,
	//       meta: {title: '在线开发', icon: 'dashboard', permission: ['dashboard']},
	//       children: [
	//         {
	//           path: '/online/auto/:code',
	//           name: 'report',
	//           component: () => import('@/views/modules/online/cgreport/OnlCgreportAutoList')
	//         },
	//       ]
	//     },
	//   ]
	// },
	{
		path: '/dashboard/go',
		component: () =>
			import('@/views/dashboard/newIndex'),
		redirect: '/reward-publish/HqHrJiangliTypeList',
		children: [
			{
				path: '/reward-publish/HqHrJiangLi',
				name: 'HqHrJiangLi',
				component: () => import( /* webpackChunkName: "user" */ '@/views/reward-publish/HqHrJiangLi')
			},
			{
				path: '/reward-publish/HqHrJiangliTypeList',
				name: 'HqHrJiangliTypeList',
				component: () => import( /* webpackChunkName: "user" */
					'@/views/reward-publish/HqHrJiangliTypeList')
			},
			{
				path: '/reward-publish/HqHrChengFa',
				name: 'HqHrChengFa',
				component: () => import( /* webpackChunkName: "user" */ '@/views/reward-publish/HqHrChengFa')
			},
			{
				path: '/salary/VeHrJingtieList',
				name: 'VeHrJingtieList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/salary/VeHrJingtieList')
			},
			{
				path: '/salary/VeHrEmployeePayrollList',
				name: 'VeHrEmployeePayrollList',
				component: () => import( /* webpackChunkName: "user" */
					'@/views/salary/VeHrEmployeePayrollList')
			},
			{
				path: '/salary/VeHrGangweiList',
				name: 'VeHrGangweiList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/salary/VeHrGangweiList')
			},
			{
				path: '/salary/VeHrJingtieManagerList',
				name: 'VeHrJingtieManagerList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/salary/VeHrJingtieManagerList')
			},
			{
				path: '/teacher-info/BaseTeacherList',
				name: 'BaseTeacherList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/teacher-info/BaseTeacherList')
			},
			{
				path: '/teacher-info/PartyMemberManagement',
				name: 'PartyMemberManagement',
				component: () => import( /* webpackChunkName: "user" */
					'@/views/teacher-info/PartyMemberManagement')
			},
			{
				path: '/teacher-info/FamilyInformation',
				name: 'FamilyInformation',
				component: () => import( /* webpackChunkName: "user" */
					'@/views/teacher-info/FamilyInformation')
			},
			{
				path: '/teacher-info/ContractManagement',
				name: 'ContractManagement',
				component: () => import( /* webpackChunkName: "user" */
					'@/views/teacher-info/ContractManagement')
			},
			{
				path: '/kaoqin/VeHrKaohe',
				name: 'VeHrKaohe',
				component: () => import( /* webpackChunkName: "user" */ '@/views/kaoqin/VeHrKaohe')
			},
			{
				path: '/kaoqin/VeHrPerformance',
				name: 'VeHrPerformance',
				component: () => import( /* webpackChunkName: "user" */ '@/views/kaoqin/VeHrPerformance')
			},
			{
				path: '/kaoqin/VeHrKaoqin',
				name: 'VeHrKaoqin',
				component: () => import( /* webpackChunkName: "user" */ '@/views/kaoqin/VeHrKaoqin')
			},
			{
				path: '/change/VeHrChangeTypeList',
				name: 'VeHrChangeTypeList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/change/VeHrChangeTypeList')
			},
			{
				path: '/change/VeHrChangeManagerList',
				name: 'VeHrChangeManagerList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/change/VeHrChangeManagerList')
			},
			{
				path: '/peixun/VeHrPeixunApplyList',
				name: 'VeHrPeixunApplyList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/peixun/VeHrPeixunApplyList')
			},
			{
				path: '/peixun/VeHrPeixunSearchList',
				name: 'VeHrPeixunSearchList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/peixun/VeHrPeixunSearchList')
			},
			{
				path: '/peixun/VeHrPeixunReviewList',
				name: 'VeHrPeixunReviewList',
				component: () => import( /* webpackChunkName: "user" */ '@/views/peixun/VeHrPeixunReviewList')
			},
		]
	},
	{
		path: '/test',
		component: BlankLayout,
		redirect: '/test/home',
		children: [{
			path: 'home',
			name: 'TestHome',
			component: () => import('@/views/Home')
		}]
	},
	{
		path: '/404',
		component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404')
	},

]
